package es.truscoandrisco.discotecasmadrid;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.Window;
import android.widget.TabHost;

public class Inicio extends TabActivity {
	
	//private static int i;
	
    @Override
    public void onCreate(Bundle savedInstanceState){
    	
        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE); 
        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.titlebar);

        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
     

            final TabHost mTabHost = getTabHost();

            
            mTabHost.addTab(mTabHost.newTabSpec("Lista").setIndicator("", 
            		this.getResources().getDrawable(R.drawable.lupa))
            		.setContent(new Intent(this, Lista.class)));
            
            mTabHost.addTab(mTabHost.newTabSpec("Actualizaciones").setIndicator("", 
            		this.getResources().getDrawable(R.drawable.estrella))
            		.setContent(new Intent(this, Actualizaciones.class)));
            
            mTabHost.addTab(mTabHost.newTabSpec("Cercanas").setIndicator("",
            		this.getResources().getDrawable(R.drawable.mapa))
            		.setContent(new Intent(this, Cercanas.class)));

            /*
            mTabHost.addTab(mTabHost.newTabSpec("Busqueda").setIndicator("",
            		this.getResources().getDrawable(R.drawable.ic_tab_artist))
            		.setContent(new Intent(this, Busqueda.class)));

            for (i = 0; i < mTabHost.getTabWidget().getChildCount(); i++) { 
                mTabHost.getTabWidget().getChildAt(i).setBackgroundColor(Color.LTGRAY); 
                }
            
            mTabHost.getTabWidget().getChildAt(mTabHost.getCurrentTab()).setBackgroundColor(Color.parseColor("#ff0000"));
            */
            
            int pos = getIntent().getIntExtra("POSICION", 0); 
            mTabHost.setCurrentTab(pos);

    }

}